<?php
namespace Api\Controller;
use Think\Controller;

class FirstController extends BaseController {

   private $m = NULL;
   private $md = NULL;
   private $navName = '订单管理';


   public function _initialize(){
   		parent::_initialize();
		$this->m = M('shop');
		$this->md = M('shop_detail');
		
		
   }
    	 	
	/**   聚餐美食-猜你喜欢  liuq
	*
	*/	
  
   public  function is_set(){
  
       //$cid = I('cid');//  用户标识  member id
       $data = $this->md->where('is_set = 2')->order('add_time desc')->limit(0,3)->select();   
      
  
       foreach( $data as $key => $item){
           $data1[$key]['id'] = M('shop')->where('id="'.$item['s_id'].'"')->getField('id');
              $data1[$key]['shop_name'] = M('shop')->where('id="'.$item['s_id'].'"')->getField('shop_name'); 
                  $data1[$key]['mid'] = M('shop')->where('id="'.$item['s_id'].'"')->getField('mid'); 
                     $data1[$key]['shop_heapic'] = $item['shop_heapic']?__VUPLOAD__.'shop_heapic/'.$item['shop_heapic']:""; //店铺头像
              
                 }
                 
               
       returnApiData2('0','成功',$data1, $data2,$data3);exit;	     
       
   }
   
          
}